<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/1/17
 * Time: 10:11
 */
class IndexController extends Controller{

    public function Index(){
        $this->display();
    }

    public function test(){
        $model = K('article');
        $data = ['title'=>'555','click'=>555];
        $model->add($data);
        //查询
        //$result = $model->where('title="222是是是"')->limit(2)->select();

        //更新
        //$data = ['title'=>'ssss','click'=>100];
        //$res = $model->where('aid = 1')->update($data);

        //删除
//        $where = 'aid=5';
//        $res = $model->where($where)->delete();
        //var_dump($res);
    }
}